﻿set(TARGET_NAME "CommonUnits")
file(GLOB HEADERS "*.h")
file(GLOB SOURCES "*.cpp")
file(GLOB UNITS "Units/*.h")

source_group("Headers" FILES ${HEADERS})
source_group("Headers/Units" FILES ${UNITS})
source_group("Sources" FILES ${SOURCES})

add_library(${TARGET_NAME} INTERFACE ${HEADERS} ${SOURCES} ${UNITS} "../../README.md")

set_target_properties(${TARGET_NAME} PROPERTIES PUBLIC_HEADER "${HEADERS}")

install(TARGETS ${TARGET_NAME} EXPORT ${TARGET_NAME} PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDEDIR}/CommonUnits)
set_target_properties(CommonUnits PROPERTIES PUBLIC_HEADER "${UNITS}")
install(TARGETS ${TARGET_NAME} PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDEDIR}/CommonUnits/Units)
